package com.cqut.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cqut.dao.AwardsSelectionMapperExtra;
import com.cqut.dto.LimitShowDTO;
import com.cqut.service.IAwardsSelectionService;

@Service
public class AwardsSelectionService implements IAwardsSelectionService{
	@Resource(name="awardsSelectionMapperExtra")
    private AwardsSelectionMapperExtra awardsSelectionMapperExtra;

	@Override
	public List<Map<String, Object>> getState() {
		return awardsSelectionMapperExtra.getState();
	}

	@Override
	public List<Map<String, Object>> getFlow() {
		return awardsSelectionMapperExtra.getFlow();
	}

	@Override
	public List<Map<String, Object>> getDetailList(String teamName,
			LimitShowDTO limitShowDTO) {
		return awardsSelectionMapperExtra.getDetailList(teamName, limitShowDTO.calculateStart(), limitShowDTO.calculateEnd());
	}

	@Override
	public List<Map<String, Object>> getList(LimitShowDTO limitShowDTO, String competeName) {
		return awardsSelectionMapperExtra.getList(competeName, limitShowDTO.calculateStart(), limitShowDTO.calculateEnd());
	}

	@Override
	public long findCountOfList(String competeName) {
		return awardsSelectionMapperExtra.findCountOfList(competeName);
	}

	@Override
	public List<Map<String, Object>> getStateList(LimitShowDTO limitShowDTO, String stateName, String competitionId) {
		return awardsSelectionMapperExtra.getStateList(limitShowDTO.calculateStart(), limitShowDTO.calculateEnd(), stateName, competitionId);
	}

	@Override
	public long findCountOfStateList(String stateName, String competitionId) {
		return awardsSelectionMapperExtra.getCountOfStateList(stateName, competitionId);
	}

	@Override
	public long getCountOfDetail(String teamName) {
		return awardsSelectionMapperExtra.getCountOfDetail(teamName);
	}
	
}
